import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.StringItem;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

public class TestHello extends MIDlet implements CommandListener {

	private Form mMainFrom;

	public TestHello() {
		// TODO Auto-generated constructor stub
		mMainFrom = new Form("First Program");

		mMainFrom.append(new StringItem(null, "Xin chao cac ban"));

		mMainFrom.addCommand(new Command("Exit", Command.EXIT, 0));

		mMainFrom.setCommandListener(this);
	}

	protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
		// TODO Auto-generated method stub

	}

	protected void pauseApp() {
		// TODO Auto-generated method stub

	}

	protected void startApp() throws MIDletStateChangeException {
		// TODO Auto-generated method stub
		Display.getDisplay(this).setCurrent(mMainFrom);
	}

	public void commandAction(Command c, Displayable s) {

		notifyDestroyed();

	}

}
